import { createApp } from 'vue'
import router from './router/index.js'
import ElementPlus from 'element-plus'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import 'element-plus/dist/index.css'
import '@/assets/style/common.less'
import '@/styles/index.scss'
import store from '@/store'
import axios from './api/axios.js'
import App from './App.vue'


const app = createApp(App)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}


//为axios配置请求的根路径
axios.defaults.baseURL = 'http://192.168.0.24:8080'
//跨域请求默认不携带cookie 后端security获取不到cookie里的jsessionid不给访问 ！！！！！！！！
axios.defaults.withCredentials = true 

app.use(store)
app.use(router)
app.use(ElementPlus)
app.mount('#app')


